using System.Data.SQLite;

namespace Rioshu.Web.ViewStateHandlers.SQLitePersister
{
    public static class SqliteConnectionManager
    {
        public static SQLiteConnection GetConnection()
        {
            var config = SqlitePersisterConfiguration.GetConfiguration();
            var connBuilder = new SQLiteConnectionStringBuilder {DataSource = config.DatabaseFileName, FailIfMissing = false};
            var connection = new SQLiteConnection(connBuilder.ConnectionString);
            return connection;
        }
    }
}